package com.guoxi.nacosconsumer9002.controller;

import com.guoxi.nacosconsumer9002.api.UserServiceApi;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping(value = "/consumer")
public class ConsumerController {
    final UserServiceApi userServiceApi;

    public ConsumerController(UserServiceApi userServiceApi) {
        this.userServiceApi = userServiceApi;
    }

    @RequestMapping
    public String consume(){
        return userServiceApi.hello();
    }
}
